<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/djerp/dj_base_data/dj_stpo_mara_view.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/djerp/dj_base_data/dj_stpo_mara_view.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'dj_stpo_id',
                footer: "Foots",
                cnName: 'BOM物料视图',
                name: 'dj_base_data/dj_stpo_mara_view',
                url: "/dj_stpo_mara_view/",
                sortName: "idnrk"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"idnrk":"","matnr":"","datuv":"","datub":"","maktx":"","maktx_parent":""});
            const searchFormOptions = ref([[{"title":"物料号","field":"idnrk","type":"like"},{"title":"父物料号","field":"matnr","type":"like"}],[{"title":"物料说明","field":"maktx","type":"like"},{"title":"父物料说明","field":"maktx_parent","type":"like"}],[{"title":"有效终止日期","field":"datuv","type":"date"},{"title":"有效起始日期","field":"datub","type":"date"}]]);
            const columns = ref([{field:'dj_stpo_id',title:'dj_stpo_id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'idnrk',title:'物料号',type:'string',link:true,width:220,align:'left',sort:true},
                       {field:'posnr',title:'行项目号',type:'string',width:220,align:'left'},
                       {field:'sorft',title:'工位',type:'string',width:220,align:'left'},
                       {field:'menge',title:'数量',type:'decimal',width:110,align:'left'},
                       {field:'matnr',title:'父物料号',type:'string',width:220,align:'left'},
                       {field:'datuv',title:'有效终止日期',type:'datetime',width:110,align:'left',sort:true},
                       {field:'datub',title:'有效起始日期',type:'datetime',width:110,align:'left',sort:true},
                       {field:'maktx',title:'物料说明',type:'string',width:220,align:'left'},
                       {field:'maktx_parent',title:'父物料说明',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
